package com.qst.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qst.system.mapper.ActivityMapper;
import com.qst.system.domain.Activity;
import com.qst.system.domain.vo.ActivityVo;
import com.qst.system.service.IActivityService;

/**
 * 活动Service业务层处理
 * 
 * @author linzhe
 * @date 2025-08-25
 */
@Service
public class ActivityServiceImpl implements IActivityService 
{
    @Autowired
    private ActivityMapper activityMapper;

    /**
     * 查询活动
     * 
     * @param aId 活动ID
     * @return 活动
     */
    @Override
    public ActivityVo selectActivityById(Long aId)
    {
        return activityMapper.selectActivityVoById(aId);
    }

    /**
     * 查询活动列表
     * 
     * @param activity 活动
     * @return 活动
     */
    @Override
    public List<ActivityVo> selectActivityList(Activity activity)
    {
        return activityMapper.selectActivityVoList(activity);
    }

    /**
     * 新增活动
     * 
     * @param activity 活动
     * @return 结果
     */
    @Override
    public int insertActivity(Activity activity)
    {
        return activityMapper.insertActivity(activity);
    }

    /**
     * 修改活动
     * 
     * @param activity 活动
     * @return 结果
     */
    @Override
    public int updateActivity(Activity activity)
    {
        return activityMapper.updateActivity(activity);
    }

    /**
     * 批量删除活动
     * 
     * @param aIds 需要删除的活动ID
     * @return 结果
     */
    @Override
    public int deleteActivityByIds(Long[] aIds)
    {
        return activityMapper.deleteActivityByIds(aIds);
    }

    /**
     * 删除活动信息
     * 
     * @param aId 活动ID
     * @return 结果
     */
    @Override
    public int deleteActivityById(Long aId)
    {
        return activityMapper.deleteActivityById(aId);
    }
}